home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Dev / ace23.lha / PRGS.lha / Turtle / boxit.b next >
Text File  |  1994-10-02  |  470b  |  36 lines

  1. '...recursive triangle consisting of boxed edges.
  2.  
  3. sub boxit(n)
  4.   if n=0 then 
  5.     forward 3
  6.   else
  7.     boxit(n-1)
  8.     turnleft 90
  9.     boxit(n-1)
  10.     turnright 90
  11.     boxit(n-1)
  12.     turnright 90
  13.     boxit(n-1)
  14.     turnleft 90
  15.     boxit(n-1)
  16.   end if 
  17. end sub
  18.  
  19. window 1,"BoxIt",(0,0)-(640,200),6
  20. font "topaz",8
  21. color 2,1
  22.  
  23.  cls
  24.  penup
  25.  setxy 0,150
  26.  pendown
  27.  turnright 90
  28.  boxit(4)
  29.  
  30.  locate 22,1
  31.  print "press 'q' to quit."
  32.  while ucase$(inkey$)<>"Q":wend
  33.  
  34. window close 1
  35.  
  36.